package com.vxdata.dev.controller;


import com.vxdata.dev.common.LogUtils;
import com.vxdata.dev.entity.DataMaskingTaskLogs;
import com.vxdata.dev.entity.R;
import com.vxdata.dev.service.IDataMaskingTaskLogsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 脱敏任务执行日志 前端控制器
 * </p>
 *
 * @author sunhongyun
 * @since 2024-02-18
 */
@RestController
@RequestMapping("/dev/data-masking-task-logs")
public class DataMaskingTaskLogsController {
    @Resource
    private IDataMaskingTaskLogsService dataMaskingTaskLogsService;

    @GetMapping("/{id}")
    public R<DataMaskingTaskLogs> test(@PathVariable Long id) {
        DataMaskingTaskLogs logs = dataMaskingTaskLogsService.getById(id);
        LogUtils.log_dev.debug("信息:" + logs);
        return R.ok();
    }

    @PostMapping("/save")
    public R<Boolean> save(@RequestBody DataMaskingTaskLogs log) {
        return R.ok(dataMaskingTaskLogsService.save(log));
    }

}
